import request from '@/utils/request'
export default {
    login(params) {
        return request({
            url: `/api/user/mobilelogin`,
            method: 'get',
            params,
        })
    },
    ///api/category
    getConfig(data) {
        return request({
            url: `/api/config`,
            method: 'POST',
            data,
        })
    },
    category(pid) {
        return request({
            url: `/api/category?pid=` + pid,
            method: 'get',
        })
    },
    getSlide(data) {
        return request({
            url: `/api/slide`,
            method: 'POST',
            data,
        })
    },
    getCategory(params) {
        return request({
            url: `/api/category`,
            method: 'get',
            params,
        })
    },
    getCourse(params) {
        return request({
            url: `/api/course`,
            method: 'get',
            params,
        })
    },
    courseSearch(data) {
        // name
        return request({
            url: `/api/course/search`,
            method: 'POST',
            data,
        })
    },
    courseDetail(id) {
        return request({
            url: `/api/course/details?id=${id}`,
            method: 'get',
        })
    },
    getSMS(params) {
        // {mobile,event}
        return request({
            url: `api/sms/send`,
            method: 'get',
            params,
        })
    },
    my(data) {
        // {mobile,event}
        return request({
            url: `api/course/my`,
            method: 'post',
            data,
        })
    },
    browse(data) {
        // {mobile,event}
        return request({
            url: `api/course/browse`,
            method: 'post',
            data,
        })
    },
    changemobile(data) {
        // {mobile,event}
        return request({
            url: `api/user/changemobile`,
            method: 'post',
            data,
        })
    },
    // /api/user/changemobile
    // api/course/my
}
